import { createApp } from "vue";
import App from "./App.vue";
import router from "@/router";
import { setupStore } from "@/store";
import { setupDirective } from "@/directive";
import VueGridLayout from "vue-grid-layout";
import DataVVue3 from "@kjgl77/datav-vue3";
import * as echarts from "echarts";
import "@/permission";
import { ElDialog } from "element-plus";
// import { vue3ScrollSeamless } from "vue3-scroll-seamless";

// 本地SVG图标
import "virtual:svg-icons-register";

// 国际化
import i18n from "@/lang/index";

// 样式
import "element-plus/theme-chalk/dark/css-vars.css";
import "@/styles/index.scss";
import "uno.css";

// 引入字体文件
import "@/assets/ifont/DINPro-Bold.ttf";
import "@/assets/ifont/siyuan.ttf";

// 解决谷歌浏览器报错
import "@/utils/browserPatch";

ElDialog.props.closeOnClickModal.default = false;

const app = createApp(App);
// 全局注册 自定义指令(directive)
setupDirective(app);
// 全局注册 状态管理(store)
setupStore(app);
// .component("vue3ScrollSeamless", vue3ScrollSeamless)
app
  .use(router)
  .use(i18n)
  .use(echarts)
  .use(VueGridLayout)
  .use(ElDialog)
  // .use(vue3ScrollSeamless)
  .use(DataVVue3)
  .mount("#app");
